package com.terry.test1.newd;

import cn.hutool.core.util.ObjectUtil;
import lombok.Getter;

import javax.xml.bind.ValidationException;

public class Address {
    @Getter
    private final String address;
    public Address(String address) throws ValidationException {
        //1.校验address 可通过validation  @Empty实现
        if(ObjectUtil.isEmpty(address)){
            throw new ValidationException("address不能为空");
        }
        this.address = address;
    }
}
